<script>
export default {
  data(){
    return {
      show: false,
      row:{},
    }
  },
  methods: {
    open(row) {
      this.row = row;
      this.show = true;
    },
    close() {
      this.show = false;
    },
    save() {
      let loading = this.$loading({
        lock: true,
        text: '绑定中...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      console.log(this.row);
      this.$kt.request.send({
        uri: "/business-shop-web/admin/shopGoodsType/save",
        data: this.row,
        stateSuccess: () => {
          loading.close();
          this.$message.success("绑定成功");
          this.show = false;
        },
        stateFail: () => {
          loading.close();
          this.$message.error("绑定失败");
        }
      });
    }
  }
}
</script>

<template>
<el-dialog
    :title="row.name + ' - 绑定客服'"
  v-model="show"
  width="300px"
>
  <div>
    <el-input
    placeholder="输入用户ID"
    v-model="row.userAccountIdOfService"
    ></el-input>
  </div>
  <div style="height: 20px"></div>
  <div style="text-align: right">
    <el-button
    type="primary"
    @click="save"
    >保存</el-button>
  </div>
</el-dialog>
</template>

<style scoped lang="scss">

</style>